/**
 * 
 */
package com.celtic.lcms.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.appfuse.model.BaseObject;

/**
 * @author Java
 *
 */
@Entity
@Table(name="Client")
public class Client extends BaseObject {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	int clId;
	String clLicNo;
	String schemaNm;
	String instiName;
	String instiUrl;
	String fName;
	String lName;
	String title;
	String addr1;
	String addr2;
	String city;
	String state;
	String country;
	String phone1;
	String phone1_ext;
	String phone2;
	String phone2_ext;
	String zip;
	String email;
	String lastUpdUserId;
	String lastUpdTs;
	
	@Id
	@Column(name="cl_id")
	public int getClId() {
		return clId;
	}	
	public void setClId(int clId) {
		this.clId = clId;
	}
	@Column(name="cl_lic_no", length=25)
	public String getClLicNo() {
		return clLicNo;
	}
	public void setClLicNo(String clLicNo) {
		this.clLicNo = clLicNo;
	}
	@Column(name="schema_nm", length=10)
	public String getSchemaNm() {
		return schemaNm;
	}
	public void setSchemaNm(String schemaNm) {
		this.schemaNm = schemaNm;
	}
	@Column(name="insti_nm", length=55)
	public String getInstiName() {
		return instiName;
	}
	public void setInstiName(String instiName) {
		this.instiName = instiName;
	}
	@Column(name="insti_url", length=40)
	public String getInstiUrl() {
		return instiUrl;
	}
	public void setInstiUrl(String instiUrl) {
		this.instiUrl = instiUrl;
	}
	@Column(name="fname", length=55)
	public String getfName() {
		return fName;
	}
	public void setfName(String fName) {
		this.fName = fName;
	}
	@Column(name="lname", length=55)
	public String getlName() {
		return lName;
	}
	public void setlName(String lName) {
		this.lName = lName;
	}
	@Column(name="title", length=10)
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	@Column(name="addr1", length=50)
	public String getAddr1() {
		return addr1;
	}
	public void setAddr1(String addr1) {
		this.addr1 = addr1;
	}
	@Column(name="addr2", length=50)
	public String getAddr2() {
		return addr2;
	}
	public void setAddr2(String addr2) {
		this.addr2 = addr2;
	}
	@Column(name="city", length=40)
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	@Column(name="state", length=20)
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	@Column(name="country", length=45)
	public String getCountry() {
		return country;
	}
	public void setCountry(String country) {
		this.country = country;
	}
	@Column(name="phone1", length=10)
	public String getPhone1() {
		return phone1;
	}
	public void setPhone1(String phone1) {
		this.phone1 = phone1;
	}
	
	@Column(length=5)
	public String getPhone1_ext() {
		return phone1_ext;
	}
	public void setPhone1_ext(String phone1_ext) {
		this.phone1_ext = phone1_ext;
	}
	@Column(name="phone2",length = 10)
	public String getPhone2() {
		return phone2;
	}
	public void setPhone2(String phone2) {
		this.phone2 = phone2;
	}
	@Column(length=5)
	public String getPhone2_ext() {
		return phone2_ext;
	}
	public void setPhone2_ext(String phone2_ext) {
		this.phone2_ext = phone2_ext;
	}
	@Column(length=9)
	public String getZip() {
		return zip;
	}
	public void setZip(String zip) {
		this.zip = zip;
	}
	@Column(length=40)
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	@Column(name="last_upd_userId",length=45)
	public String getLastUpdUserId() {
		return lastUpdUserId;
	}
	public void setLastUpdUserId(String lastUpdUserId) {
		this.lastUpdUserId = lastUpdUserId;
	}
	@Column(name="last_upd_ts")
	public String getLastUpdTs() {
		return lastUpdTs;
	}
	public void setLastUpdTs(String lastUpdTs) {
		this.lastUpdTs = lastUpdTs;
	}
	
	
	@Override
	public String toString() {
		return "Client [clId=" + clId + ", clLicNo=" + clLicNo + ", schemaNm="
				+ schemaNm + ", instiName=" + instiName + ", instiUrl="
				+ instiUrl + ", fName=" + fName + ", lName=" + lName
				+ ", title=" + title + ", addr1=" + addr1 + ", addr2=" + addr2
				+ ", city=" + city + ", state=" + state + ", country="
				+ country + ", phone1=" + phone1 + ", phone1_ext=" + phone1_ext
				+ ", phone2=" + phone2 + ", phone2_ext=" + phone2_ext
				+ ", zip=" + zip + ", email=" + email + ", lastUpdUserId="
				+ lastUpdUserId + ", lastUpdTs=" + lastUpdTs + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((addr1 == null) ? 0 : addr1.hashCode());
		result = prime * result + ((addr2 == null) ? 0 : addr2.hashCode());
		result = prime * result + ((city == null) ? 0 : city.hashCode());
		result = prime * result + clId;
		result = prime * result + ((clLicNo == null) ? 0 : clLicNo.hashCode());
		result = prime * result + ((country == null) ? 0 : country.hashCode());
		result = prime * result + ((email == null) ? 0 : email.hashCode());
		result = prime * result + ((fName == null) ? 0 : fName.hashCode());
		result = prime * result
				+ ((instiName == null) ? 0 : instiName.hashCode());
		result = prime * result
				+ ((instiUrl == null) ? 0 : instiUrl.hashCode());
		result = prime * result + ((lName == null) ? 0 : lName.hashCode());
		result = prime * result
				+ ((lastUpdTs == null) ? 0 : lastUpdTs.hashCode());
		result = prime * result
				+ ((lastUpdUserId == null) ? 0 : lastUpdUserId.hashCode());
		result = prime * result + ((phone1 == null) ? 0 : phone1.hashCode());
		result = prime * result
				+ ((phone1_ext == null) ? 0 : phone1_ext.hashCode());
		result = prime * result + ((phone2 == null) ? 0 : phone2.hashCode());
		result = prime * result
				+ ((phone2_ext == null) ? 0 : phone2_ext.hashCode());
		result = prime * result
				+ ((schemaNm == null) ? 0 : schemaNm.hashCode());
		result = prime * result + ((state == null) ? 0 : state.hashCode());
		result = prime * result + ((title == null) ? 0 : title.hashCode());
		result = prime * result + ((zip == null) ? 0 : zip.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Client other = (Client) obj;
		if (addr1 == null) {
			if (other.addr1 != null)
				return false;
		} else if (!addr1.equals(other.addr1))
			return false;
		if (addr2 == null) {
			if (other.addr2 != null)
				return false;
		} else if (!addr2.equals(other.addr2))
			return false;
		if (city == null) {
			if (other.city != null)
				return false;
		} else if (!city.equals(other.city))
			return false;
		if (clId != other.clId)
			return false;
		if (clLicNo == null) {
			if (other.clLicNo != null)
				return false;
		} else if (!clLicNo.equals(other.clLicNo))
			return false;
		if (country == null) {
			if (other.country != null)
				return false;
		} else if (!country.equals(other.country))
			return false;
		if (email == null) {
			if (other.email != null)
				return false;
		} else if (!email.equals(other.email))
			return false;
		if (fName == null) {
			if (other.fName != null)
				return false;
		} else if (!fName.equals(other.fName))
			return false;
		if (instiName == null) {
			if (other.instiName != null)
				return false;
		} else if (!instiName.equals(other.instiName))
			return false;
		if (instiUrl == null) {
			if (other.instiUrl != null)
				return false;
		} else if (!instiUrl.equals(other.instiUrl))
			return false;
		if (lName == null) {
			if (other.lName != null)
				return false;
		} else if (!lName.equals(other.lName))
			return false;
	/*	if (lastUpdTs == null) {
			if (other.lastUpdTs != null)
				return false;
		} else if (!lastUpdTs.equals(other.lastUpdTs))
			return false;
		if (lastUpdUserId == null) {
			if (other.lastUpdUserId != null)
				return false;
		} else if (!lastUpdUserId.equals(other.lastUpdUserId))
			return false;*/
		if (phone1 == null) {
			if (other.phone1 != null)
				return false;
		} else if (!phone1.equals(other.phone1))
			return false;
		if (phone1_ext == null) {
			if (other.phone1_ext != null)
				return false;
		} else if (!phone1_ext.equals(other.phone1_ext))
			return false;
		if (phone2 == null) {
			if (other.phone2 != null)
				return false;
		} else if (!phone2.equals(other.phone2))
			return false;
		if (phone2_ext == null) {
			if (other.phone2_ext != null)
				return false;
		} else if (!phone2_ext.equals(other.phone2_ext))
			return false;
		if (schemaNm == null) {
			if (other.schemaNm != null)
				return false;
		} else if (!schemaNm.equals(other.schemaNm))
			return false;
		if (state == null) {
			if (other.state != null)
				return false;
		} else if (!state.equals(other.state))
			return false;
		if (title == null) {
			if (other.title != null)
				return false;
		} else if (!title.equals(other.title))
			return false;
		if (zip == null) {
			if (other.zip != null)
				return false;
		} else if (!zip.equals(other.zip))
			return false;
		return true;
	}
	
	
	
	
	
	

}
